package org.filetransfer.file_transfer_java_backend.repository;
import org.filetransfer.file_transfer_java_backend.entity.FileUpload;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Optional;
@Repository
public interface FileUploadRepository extends JpaRepository<FileUpload, Long> {
    Optional<FileUpload> findByMd5(String md5);
    boolean existsByMd5(String md5);
    boolean existsAllByMd5In(Collection<String> md5s);
    List<FileUpload> findAllByMd5In(Collection<String> md5s);
    void deleteByMd5(String md5);
}
